﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace EQual.MainModule.Employees.EmployeesDetailsViews
{
    class EmployeeTrainingPresenter : EQual .Infrastructure .MVPFramework .Presenters .ListPresenterSimple  <EmployeeTrainingView,DataAccesLayer .DomainModel .BaseDataAccesObject >
    {
        public EmployeeTrainingPresenter()
        {
            InitializeView();
        }

        protected override object GetCollection()
        {
            return new DataAccesLayer.EQualDataLayerFactory().GetEmployeeAccesLayer().GetEmployeeTrainings(ActiveItem);
        }

        protected override void View_ItemAdded(object sender, Microsoft.Practices.Composite.Events.DataEventArgs<object> e)
        {
            new DataAccesLayer.EQualDataLayerFactory().GetEmployeeAccesLayer().AddEmployeeTrainings(ActiveItem);
            base.View_ItemAdded(sender, e);
        }
   

    }
}
